import request from "@/utils/request";

// 获取地图数据
export const getBaseMap = (params: any) => {
  return request({
    url: "/screen/secondHouse/getBaseMap",
    method: "get",
    params: params,
  });
};

// 获取商品住宅面积及去化周期统计 queryStr = 住宅
export const getPersonHouseNumber = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getHouseAreaAndQhzqStatistics",
    method: "post",
    data: params,
  });
};

// 获取新增预售商品住宅供应量统计 queryType = 1供应量 2供应面积 queryStr = 住宅
export const getSecondHouseTradeAreaAndNumber = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getYzysHouseStatistics",
    method: "post",
    data: params,
  });
};

// 获取已建未售（租）住房供应统计 queryType = 1供应量 2供应面积
export const getPersonHouseFundStatistics = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getYjwsStatistics",
    method: "post",
    data: params,
  });
};

// 各地区住房空置率走势
export const getSecondHouseSaleTrend = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getVacantHouseTrend",
    method: "post",
    data: params,
  });
};

// 房地产开发用地供应面积统计
export const getPersonHouseStatistics = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getDevelopAreaStatistics",
    method: "post",
    data: params,
  });
};

// 获取已供未建住宅用地面积
export const getSecondHouseSalePriceAndArea = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getYgwjHouseArea",
    method: "post",
    data: params,
  });
};

// 获取房地产开发用地供应走势 queryStr = 住宅 或者 商业用房
export const getVacantHouseTrend = (params: any) => {
  return request({
    url: "/screen/commercialSupply/getDevelopAreaTrend",
    method: "post",
    data: params,
  });
};
